package com.fjh.springboot_01.service;

import com.fjh.springboot_01.pojo.tutor.Tutoring;
import com.fjh.springboot_01.pojo.tutor.TutoringBooking;
import com.fjh.springboot_01.pojo.tutor.TutoringSchedule;
import java.util.List;
import java.util.Map;

public interface TutoringService {
    // 家教信息相关
    void publishTutoring(Tutoring tutoring);
    List<Tutoring> getAllActiveTutoring();
    List<Tutoring> getAllActiveTutoringWithTeacherInfo();
    List<Tutoring> getTeacherTutoring(Integer teacherId);
    Tutoring getTutoringById(Integer id);
    void updateTutoringStatus(Integer id, Integer status);
    void updateTutoring(Tutoring tutoring);
    
    // 管理员相关
    List<Tutoring> getAllTutoring();
    
    // 预约相关
    void createBooking(TutoringBooking booking);
    List<TutoringBooking> getTeacherBookings(Integer teacherId);
    List<TutoringBooking> getStudentBookings(Integer studentId);
    void updateBookingStatus(Integer id, Integer status);
    TutoringBooking getBookingById(Integer id);
    TutoringBooking findBookingByStudentAndTeacherId(Integer studentId, Integer teacherId);
    
    // 主页相关
    List<Tutoring> getLatestTutoring(int limit);
    Map<String, Integer> getSubjectStatistics();
    int getTutoringCount();
    int getCompletedTutoringCount();
    
    // 获取学生已确认预约的老师的课程
    List<Tutoring> getStudentConfirmedTutorings(Integer studentId);

    // 教师删除预约
    void teacherDeleteBooking(Integer id);

    // 学生删除预约
    void studentDeleteBooking(Integer id);
    
    // 获取课程安排
    TutoringSchedule getScheduleById(Integer id);
} 